﻿{
    Title: "WiKi markup syntax parser",
    Remarks: "Parse the WiKi syntax and render to XHTML",
    Markups: [
    {
        Name:"List",
        Syntax: "*{0}",
        Remarks:"Usage:*Element 1,",
        Match: "(?<=(\\n|^))((\\*|\\#)+(\\ )?.+?\\n)+",
        Marco: "FormatList",
        Icon:"unorderedList.gif"
    },
{
    Name:"NoWiKi",
    Syntax:"<nowiki>{0}</nowiki>",
    Remarks:"Skip the WiKi markup tags.",
    Match: "\\<nowiki\\>(.|\n|\r)+?\\<\\/nowiki\\>",
    Replacement: "$1",
    Icon:"nowiki.png"
},
{
    Name:"Toc",
    Syntax:"{toc}",
    Remarks:"Display the content table on the top of the article",
    Match: "{toc}",
    Marco:"FormatToc",
    Icon:"toc.gif"
},
{
    Name:"Link",
    Syntax: "[{Url}|{Title}]",
    Remarks:"Parse url link.",
    Match: "\\[([a-zA-z]+:\\/\\/.+?)\\|(.+?)\\]",
    Replacement: "<a href=\"$1\">$2</a>",
    Icon:"ExternalLink.gif"
},
{
    Name:"UserLink",
    Syntax: "[user]",
    Match: "\\[user\\]",
    Marco: "FormatUser",
    Icon:"userlink.gif"
},
{
    Name:"Image",
    Syntax: "[image|{title}|{url}]",
    Remarks:"The image markup. [image|tooltip text|fileName]",
    Match: "\\[image+?((\\:|\\|)(?<title>.+?)\\|(?<url>.+?))\\]+?",
    Icon:"img.gif",
    Marco:"FormatImageUrl"
},
{
    Name:"Image1",
    Syntax: "[image|{title}|{url}]",
    Remarks:"The image markup.",
    Match: "\\[image+?(\\|\\|(?<url>.+?))\\]+?",
    Icon:"ui-rtb-icon ui-rtb-icon-image",
    Marco:"FormatImageUrl"
},
{
    Name:"BoldItalic",
    Syntax: "'''''{0}'''''",
    Remarks: "Bold font style.",
    Match: "'''''(.+?)'''''",
    Replacement: "<strong><i>$1</i></strong>",
    Icon:""
},
{
    Name:"Bold",
    Syntax: "'''{0}'''",
    Remarks: "Bold font style.",
    Match: "'''(.+?)'''",
    Replacement: "<strong>$1</strong>",
    Icon:"bold.png"
},
{
    Name:"Italic",
    Syntax: "''{0}''",
    Remarks: "Italic font style.",
    Match: "''(.+?)''",
    Replacement: "<i>$1</i>",
    Icon:"Italic.png"
},
{
    Name:"Underline",
    Syntax: "__{0}__",
    Remarks: "The underline font style.",
    Match: "__(.+?)__",
    Replacement: "<u>$1</u>",
    Icon:"Underline.png"
},
{
    Name:"StrikeThrough",
    Syntax: "--{0}--",
    Remarks: "The striked font style.",
    Match: "--(.+?)--",
    Replacement: "<strike>$1</strike>",
    Icon:"Strike.png"
},
{
    Name : "Header4",
    Syntax: "====={0}=====",
    Remarks: "Header4 style",
    Match: "^=====(.+?)=====\\n?",
    Replacement: "<h4>$1</h4>\n",
    Icon:"h4.png"
},
{
    Name: "Header3",
    Syntax: "===={0}====",
    Remarks: "Header3 style",
    Match: "^====(.+?)====\\n?",
    Replacement: "<h3 class=\"separator ui-widget-content ui-border-bottom\" style=\"background:none;\">$1</h3>\n",
    Icon:"h3.png"
},
{
    Name: "Header2",
    Syntax: "==={0}===",
    Remarks: "Header2 style",
    Match: "^===(.+?)===\\n?",
    Replacement: "<h2 class=\"separator ui-widget-content ui-border-bottom\" style=\"background:none;\">$1</h2>\n",
    Icon:"h2.png"
},
{
    Name: "Header1",
    Syntax: "=={0}==",
    Remarks: "Header1 style",
    Match: "^==(.+?)==\\n?",
    Replacement: "<h1 class=\"separator ui-widget-content ui-border-bottom\" style=\"background:none;\">$1</h1>\n",
    Icon:"h1.png"
},
{
    Name: "Horizontalline",
    Syntax: "----",
    Remarks: "Horizontal Line",
    Match: "^----$",
    Replacement: "<div class=\"ui-widget-content\" style=\"height:2px;border-left:none;border-right:none;border-bottom:none;display:block;\"></div>",
    Icon:"Horizontalline.gif"
},
{
    Name:"Linebreak",
    Syntax: "{br}",
    Remarks: "Line break",
    Match: "\\{BR\\}",
    Replacement: "<br />",
    Icon:"br.png"
},
{
    Name:"Inlinecode",
    Syntax: "{{{0}}}",
    Remarks: "Inline code",
    Match: "\\{\\{((.|\\n|\\r)+?)\\}\\}",
    Replacement: "<pre><code>$1</code></pre>",
    Icon:""
},
{
    Name:"Blockcode",
    Syntax: "{{{{0}}}}",
    Remarks: "Block code",
    Match: "\\{\\{\\{((.|\\n|\\r)+?)\\}\\}\\}",
    Marco: "FormatCodeBlock",    
    Icon:"Code.png"
},
{
    Name:"Blockcode2",
    Syntax: "<code {0}>{1}</code>",
    Remarks: "Block code",
    Match: "\\<code\\s(.+?)\\>((.|\\n|\\r)+?)\\<\\/code\\>",
    Marco: "FormatCodeBlock",
    Icon:""
},
{
    Name:"Snippet",
    Syntax: "{s:param1|param2|....}",
    Remarks:"Snippet",
    Match: "\\{s(\\:|\\|)(?<name>.+?)(\\|(?<params>.+?))*}",
    Marco:"FormatSnippet",
    Icon:"Snippet.png"
},
{
    Name:"PageLink",
    Syntax: "[Page name | Title ]",
    Remarks:"Parse url link.",
    Match: "\\[(.+?)\\|(.+?)\\]",
    Marco:"FormatPageUrl",
    Icon:"pagelink.png"
}
]
}